-
Notifications
You must be signed in to change notification settings - Fork 804
fix(render): edge environment errors with MessageChannel #2225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8549fa1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
2eba90b
to
98c3d9b
Compare
0074ddf
to
f7e553f
Compare
201fd73
to
b5b9089
Compare
Does this address also this issue? #1630 |
@adrai yes, but introduces another error for Next.js running on the edge |
react-dom/server.edge
on edge environments
This is meant for partially fixing #1630 which is caused by a browser JS API trying to be used on the edge environment. React DOM does provide this
react-dom/server.edge
export that you can use which doesn't use that API, and works for raw edge environments, like Cloudflare Workers. I've tested this on our Cloudflare Workers ExampleBut, when running in Next.js on the edge, this error happens after this pull request:
And according to vercel/next.js#71865, this happens because we're running React DOM in a React Server environment which isn't really allowed. Not sure what we can do to actually circumvent this, except for waiting for https://github.com/facebook/react/tree/main/packages/react-markup to get into a stable version, or use the experimental itself.